1. Technical Field
The present invention relates generally to an improved data processing system, and, in particular, to a method and apparatus for converting a program or source code file from a programming language to a markup language.
2. Description of Related Art
The World Wide Web (WWW, also known simply as “the Web”) is an abstract cyberspace of information that is physically transmitted across the hardware of the Internet. In the Web environment, servers and clients communicate using Hypertext Transport Protocol (HTTP) to transfer various types of data files. Much of this information is in the form of Web pages identified by unique Uniform Resource Locators (URLs) or Uniform Resource Identifiers (URIs) that are hosted by servers on Web sites. The Web pages are often formatted using Hypertext Markup Language (HTML), which is a file format that is understood by software applications, called Web browsers. A browser requests the transmission of a Web page from a particular URL, receives the Web page in return, parses the HTML of the Web page to understand its content and presentation options, and displays the content on a computer display device. By using a Web browser, a user may navigate through the Web using URLs to view Web pages.
As the Web continues to increase dramatically in size, companies and individuals continue to look for ways to enhance its simplicity while still delivering the rich graphics that people desire. Although HTML is generally the predominant display format for data on the Web, this standard is beginning to show its age as its display and formatting capabilities are rather limited. If someone desires to publish a Web page with sophisticated graphical effects, the person will generally choose some other data format for storing and displaying the Web page. Sophisticated mechanisms have been devised for embedding data types within Web pages or documents. At times, an author of Web content may create graphics with special data types that require the use of a plug-in.
The author of Web content may also face difficulties associated with learning various data formats. Moreover, many different languages other than HTML exist for generating presentation data, such as page description languages. However, some of these languages do not lend themselves to use on the Web. Significant costs may be associated with mastering all of these methods.
On the other hand, the application programming interfaces (APIs) of certain operating system environments or programming environments are well-known. Persons who write programs for these APIs have usually mastered the display spaces and methods of these APIs.
A standard has been proposed for Precision Graphics Markup Language (PGML), which is an extensible Markup Language (XML) compatible markup language. This standard attempts to bridge the gap between markup languages and page description languages. Markup languages provide flexibility and power in structuring and transferring documents yet are relatively limited, by their generalized nature, in their ability to provide control over the manner in which a document is displayed. PGML incorporates the imaging model common to the PostScript® language and the Portable Document Format (PDF) with the advantages of XML. However, PGML does not tap the existing skills of programmers who are very knowledgeable about the syntax of many different programming languages which are used to define and implement graphical presentation capabilities on various computer platforms.
Therefore, it would useful to have a method for adapting well-known APIs in some manner for use as a Web-based page description language. It would be particularly advantageous for the method to provide the ability to produce documents that conform with evolving markup language processing standards.